package com.saic.data.dotask;

import java.io.IOException;

import org.apache.hadoop.hbase.client.ResultScanner;

import com.saic.data.table.TableUtil;
import com.saic.data.util.HbaseUtil;

/**
 * @DESC:FROM-TO查询
 * @author Xinshiyou
 */
public class QueryByFromTo extends DoTask {

	private String tabName;
	private String from;
	private String to;

	public QueryByFromTo(String tabName, String from, String to) {
		this.tabName = tabName;
		this.from = from;
		this.to = to;
	}

	public void doTask() {
		try {
			System.out.println("QueryByConditionFromTo-->doTask-->" + tabName);
			result = HbaseUtil.QueryByCondition(tabName, from, to);
		} catch (IOException e) {
			TableUtil.pm(this.getClass(), e.getMessage());
		}
	}

	public ResultScanner getResult() {
		return (ResultScanner) result;
	}
}
